<template>
  <div class="form-list">
    <div class="top">
      <div class="pledgee-name pledgee-name-one">
        <h1>撤回转让/移转申请/注册商标申请书</h1>
      </div>

      <div class="pledgee-msg">
        <div class="top-left">
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">转让人名称(中文) ：</span>
              <el-input v-if="control" v-model="appName" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{appName}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-right">
              <span class="form-menu-text">(英文) ：</span>
              <el-input v-if="control" v-model="  appNameEn" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{appNameEn}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">转让人地址(中文) ：</span>
              <el-input v-if="control" v-model="appAddCn" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{appAddCn}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-right">
              <span class="form-menu-text">(英文) ：</span>
              <el-input v-if="control" v-model="appAddEn" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{appAddEn}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">受让人名称(中文) ：</span>
              <el-input v-if="control" v-model="transfereesName" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{transfereesName}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-right">
              <span class="form-menu-text">(英文) ：</span>
              <el-input v-if="control" v-model="transfereesNameEn" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{transfereesNameEn}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">受让人地址(中文) ：</span>
              <el-input v-if="control" v-model=" transfereesAddr" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{transfereesAddr}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-right">
              <span class="form-menu-text">(英文) ：</span>
              <el-input v-if="control" v-model=" transfereesAddrEn" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{ transfereesAddrEn}}</span>
            </div>
          </div>

          <!-- 新增字段 -->
          <!-- 受让人营业执照 -->
          <div v-if="transfereesType==0 || transfereesType==1 ">
            <div class="form-menu">
              <div class="form-menu-left">
                <span class="form-menu-text">受让人营业执照：</span>
                <span class="parallelism">
                  <imgshow>
                    <img class="businessLicense" :src="this.mconfig.host+businessLicense" alt />
                  </imgshow>
                </span>
              </div>
            </div>
            <!-- 受让人身份证正反面照片 -->
            <div class="form-menu" style="margin-top:10px" v-if="transfereesType==1">
              <div class="form-menu-left">
                <span class="form-menu-text">受让人身份证正反面照片:</span>
                <span class="parallelism">
                  <imgshow>
                    <img class="iDAddress" :src="this.mconfig.host+iDAddress" alt />
                  </imgshow>
                </span>
              </div>
            </div>
          </div>

          <!-- 其他有效证件 -->
          <div class="form-menu" v-if="transfereesType==9" style="margin-top:10px">
            <div class="form-menu-left">
              <span class="form-menu-text">受让人有效证件 :</span>
              <span class="parallelism">
                <imgshow>
                  <img class="businessLicense" :src="this.mconfig.host+businessLicense" alt />
                </imgshow>
              </span>
            </div>
          </div>

          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">邮政编码：</span>
              <el-input v-if="control" v-model="postCode" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{postCode}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">联系人：</span>
              <el-input v-if="control" v-model="contacts" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{contacts}}</span>
            </div>
          </div>

          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">邮箱：</span>
              <span class="parallelism">{{email}}</span>
            </div>
          </div>

          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">电话：</span>
              <el-input v-if="control" v-model="phone" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{phone}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">代理机构名称：</span>
              <el-input v-if="control" v-model="proxyOrganizationName" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{deptName}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">商标申请号/注册号：</span>
              <el-input v-if="control" v-model="registNum" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{registNum}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">原转让申请号：</span>
              <el-input v-if="control" v-model="transferApplicantNum" placeholder="请输入内容"></el-input>
              <span class="parallelism" v-else>{{transferApplicantNum}}</span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">是否共有商标 ：</span>
              <div v-if="control" style="width:100%;padding-left:30px">
                <el-radio v-model="isShare" label="1">是</el-radio>
                <el-radio v-model="isShare" label="0">否</el-radio>
              </div>
              <!-- <span class="parallelism" v-else>{{isSharee}}</span> -->
              <span class="parallelism" v-else>
                <!-- <el-radio v-model="isSharee" label="1" :disabled="isSharee==0?true:false">是</el-radio>
                <el-radio v-model="isSharee" label="0" :disabled="isSharee==1?true:false">否</el-radio>-->
                <span v-if="isShare==1">是</span>
                <span v-else>否</span>
              </span>
            </div>
          </div>
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text" style="height:100%">撤回理由：</span>
              <el-input
                v-if="control"
                v-model=" reasonsWithdrawal"
                type="textarea"
                show-word-limit
                maxlength="100"
                :rows="1"
                placeholder="请输入内容"
              ></el-input>
              <span class="parallelism" v-else>{{reasonsWithdrawal}}</span>
            </div>
          </div>

          <!-- 营业执照 -->
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">营业执照：</span>
              <span class="parallelism">
                <imgshow>
                  <img class="busImg" :src="this.mconfig.host+busimg" alt />
                </imgshow>
              </span>
            </div>
          </div>

          <!-- 身份证 -->
          <div class="form-menu" v-if="appliType==1">
            <div class="form-menu-left">
              <span class="form-menu-text">身份证 :</span>
              <span class="parallelism">
                <imgshow>
                  <img class="idCardImg" :src="this.mconfig.host+idcardimg" alt />
                </imgshow>
              </span>
            </div>
          </div>

          <div class="form-menu displayNone">
            <div class="stamp">转让人章戳(签字) ：</div>
            <div class="stamp">受让人章戳(签字) ：</div>
            <div class="stamp">代理机构章戳：</div>
          </div>
          <div class="form-menu displayNone">
            <div class="agent">代理人签字：</div>
          </div>
          <div class="form-menu displayNone" style="margin-top:40px">
            <span style="color:#999; letter-spacing:5px">注：请按说明填写</span>
          </div>
          <div class="form-menu">
            <div class="form-menu-left">
              <span class="form-menu-text">网上确认书：</span>
              <span class="parallelism">
                <imgshow>
                  <img class="idCardImg" :src="imgURL(qrfiles)" />
                </imgshow>
              </span>
            </div>
          </div>

          <!--<div class="form-menu" v-if="otherfile != []">-->
          <div class="form-menu" v-if="otherfile.length>0">
            <div class="form-menu-left">
              <span class="form-menu-text">其他附件：</span>
              <span class="parallelism">
                <imgshow v-for="(item,index) in otherfile" :key="index">
                  <img class="idCardImg" :src="imgURL(item)" />
                </imgshow>
              </span>
            </div>
          </div>

        </div>
      </div>
    </div>

    <div class="follower bottom" v-if="this.isSharee == 1">
      <div>
        <div class="follower-title">
          <div class="pledgee-name">
            <h1>
              撤回转让/移转申请/注册商标申请书
              <br />(附页)
            </h1>
            <p style="font-weight: 600;">其他受让共有人</p>
          </div>
        </div>
        <proAppend class="part" :callback="commons"></proAppend>
        <!-- <div class="follower-matter">
          <div class="follower-matter-frame" v-for="(item, index) in commons" :key="index">
            <div>
              <div class="follower-matter-text">
                <span>{{index + 1}}.名称(中文) ：</span>
                <span>{{item.partNameCh}}</span>
              </div>
              <div class="follower-matter-text">
                <span>(英文) ：</span>
                <span>{{item.partNameEn}}</span>
              </div>
              <div class="follower-matter-text">
                <span>地址(中文) ：</span>
                <span>{{item.partAddrCh}}</span>
              </div>
              <div class="follower-matter-text">
                <span>(英文) ：</span>
                <span>{{item.partAddrEn}}</span>
              </div>
            </div>
            <div class="seal displayNone">（戳章/签字）</div>
          </div>
        </div>-->
      </div>
     
        <div class="follower-title">
          <div class="pledgee-name">
            <p style="font-weight: 600;">其他转让共有人</p>
          </div>
        </div>
        <proAppend class="part" :callback="common"></proAppend>
        <!-- <div class="follower-matter">
          <div class="follower-matter-frame" v-for="(item, index) in common" :key="index">
            <div>
              <div class="follower-matter-text">
                <span>{{index + 1}}.名称(中文) ：</span>
                <span>{{item.partNameCh}}</span>
              </div>
              <div class="follower-matter-text">
                <span>(英文) ：</span>
                <span>{{item.partNameEn}}</span>
              </div>
              <div class="follower-matter-text">
                <span>地址(中文) ：</span>
                <span>{{item.partAddrCh}}</span>
              </div>
              <div class="follower-matter-text">
                <span>(英文) ：</span>
                <span>{{item.partAddrEn}}</span>
              </div>
            </div>
            <div class="seal displayNone">（戳章/签字）</div>
          </div>
        </div>-->
     
    </div>

    <!-- <div class="botton" style="width:100%;text-align:center;padding:15px 0;">
            <a class="buttona" href="javascript:;" @click="submit()">提交</a>
    </div>-->

    <!-- <div class="amend-btn">
          <a class="buttona" href="javascript:;" @click="notarizeAmend">确认修改</a>
    </div>-->
  </div>
</template>

<script>
import imgshow from "../common/imgshow";
import proAppend from "../common/proAppend";
export default {
  components: {
    imgshow,
    proAppend,
  },
  data() {
    return {
      qrfiles: "", //网上确认书
      email: "",
      deptName: "", //代理机构名称
      phone: "",
      branchNetworkId: "", //  网点编号
      contacts: "", //   联系人
      id: "",
      isShare: "", //   是否共有商标
      phoneNum: "", //   电话
      postCode: "", //   邮政编码
      proAppendJson: "", //   共享人 json
      proxyOrganizationName: "", //   代理机构名称
      reasonsWithdrawal: "", //   撤回理由：
      registNum: "", //   商标申请号/注册号：
      subStatus: "", //   状态 2选择通过 3选择未通过 4未审核
      transferApplicantNum: "", //   原转让申请号：
      transfereesAddr: "", //   受让人地址（中文）
      transfereesAddrEn: "", //   受让人地址（英文）
      transfereesName: "", //   受让人名称（中文）
      transfereesNameEn: "", //   受让人名称（英文）
      // transferorAddr: "", //   转让人地址（中文）
      // transferorAddrEn: "", //   转让人地址（英文）
      // transferorName: "", //   转让人名称（中文）
      // transferorNameEn: "", //   转让人名称（英文）
      otherfile:[],
      appName: "",
      appNameEn: "",
      appAddCn: "",
      appAddEn: "",
      userId: "", //   用户ID
      idcardimg: "", //身份证正面
      busimg: "", //营业执照
      businessLicense: "", //受让人营业执照
      iDAddress: "", //受让人身份证
      appliType: "", //是否存在身份证
      transfereesType: "",

      common: [],
      commons: [],

      control: false, //   控制标签的显示
      options: [
        { value: 0, label: "企业" },
        { value: 1, label: "个人" },
      ],
      optionss: [
        { value: 1, label: "保存" },
        { value: 2, label: "通过" },
        { value: 3, label: "未通过" },
        { value: 4, label: "未审核" },
      ],
      dialogVisible: false,
      disabledd: false,

      isSharee: "", //   是否共有商标的文本部分(页面展示)
      subStatuss: "", //   状态(页面展示)
    };
  },
  methods: {
    imgURL(_url) {
      var newUrl = this.mconfig.host + _url;
      return newUrl;
    },
    genre() {
      ////console.log(this.appliType)
    },
    notarizeAmend() {
      if (this.control) {
        this.control = false;
        ////console.log(this.control)
      } else {
        this.control = true;
        ////console.log(this.control)
      }
    },
    handleExceed(files, fileList) {
      //   图片地址
      this.disabledd = true;
      let a = "http://api_devs.wanxikeji.cn/" + files.data;
      this.imgPath.push(a);
      // ////console.log(this.imgPath)
    },
    handlePictureCardPreview(file) {
      //  上传图片的放大显示
      this.imgPath = file.url;
      this.dialogVisible = true;
      //  ////console.log('www',file)
    },
    handleRemove(file) {
      //  上传图片的删除
      ////console.log(file);
      this.disabledd = false;
      this.$refs.upload.clearFiles();
    },
    add(val) {
      this.$http
        .get("/trademark/proWta/findByIdDetl", {
          params: {
            id: val,
          },
        })
        .then((res) => {
          console.log(res);
          // console.log(res);
          //  this.transferorName = res.data.data.data.allowFromCh         //   转让人名称（中文）
          //  this.transferorNameEn = res.data.data.data.allowFromEn       //   转让人名称（英文）
          //  this.transferorAddr = res.data.data.data.allowFromAddrCh     //   转让人地址（中文）
          //  this.transferorAddrEn = res.data.data.data.allowFromAddrEn   //   转让人地址（英文）
          this.appName = res.data.data.data.appName; //转让人
          this.appNameEn = res.data.data.data.appNameEn; //转让人(英文)
          this.appAddCn = res.data.data.data.appAddCn; //转让人地址
          this.appAddEn = res.data.data.data.appAddEn; //转让人地址(英文)
          this.email = res.data.data.data.email; //邮箱
          this.qrfiles = res.data.data.data.qrfile;
          this.otherfile = JSON.parse(res.data.data.data.otherfile);
          // this.transferorName = res.data.data.data.transferorName; //   转让人名称（中文）
          // this.transferorNameEn = res.data.data.data.transferorNameEn; //   转让人名称（英文）
          // this.transferorAddr = res.data.data.data.transferorAddr; //   转让人地址（中文）
          // this.transferorAddrEn = res.data.data.data.transferorAddrEn; //   转让人地址（英文）
          this.transfereesName = res.data.data.data.transfereesName; //   受转让人名称（中文）
          this.transfereesNameEn = res.data.data.data.transfereesNameEn; //   受转让人名称（英文）
          this.transfereesAddr = res.data.data.data.transfereesAddr; //   受转让人地址（中文）
          this.transfereesAddrEn = res.data.data.data.transfereesAddrEn; //   受转让人地址（英文）
          this.iDAddress = res.data.data.data.iddbimage; //受让人身份证
          this.businessLicense = res.data.data.data.businessLicense; //受让人营业执照
          this.postCode = res.data.data.data.postCode; //  邮政编码
          this.contacts = res.data.data.data.contacts; //  联系人
          this.phone = res.data.data.data.phone; //  电话
          this.proxyOrganizationName = res.data.data.data.proxyOrganizationName; //  代理机构
          this.registNum = res.data.data.data.registNum; //  商标申请/注册号
          this.transferApplicantNum = res.data.data.data.transferApplicantNum; //  原转让申请号
          this.isSharee = String(res.data.data.data.isShare); //  是否共有商标
          this.reasonsWithdrawal = res.data.data.data.reasonsWithdrawal; //  撤回理由
          this.idcardimg = res.data.data.data.idcardimg; //身份证正面
          this.busimg = res.data.data.data.busimg; //营业执照
          this.appliType = res.data.data.data.appliType; //是否存在身份证
          this.transfereesType = res.data.data.data.transfereesType; //是否存在身份证

          this.common = res.data.data.append; //   共有人
          this.commons = res.data.data.append2;
          this.isShare = res.data.data.data.isShare; //是否共有商标
          this.deptName = res.data.data.data.deptName; //代理机构名称
        });
    },
  },
  watch: {
    control(val) {
      if (val) {
      } else {
        if (this.isShare == 1) {
          this.isSharee = "是";
        } else if (this.isShare) {
          this.isSharee = "否";
        }

        if (this.subStatus == 1) {
          this.subStatuss = "保存";
        } else if (this.subStatus == 2) {
          this.subStatuss = "通过";
        } else if (this.subStatus == 3) {
          this.subStatuss = "未通过";
        } else if (this.subStatus == 4) {
          this.subStatuss = "未审核";
        }
      }
      ////console.log(this.applicantType,this.isShare,this.subStatus)
    },
  },
  mounted() {
    let aa = this.$route.query.id;
    this.add(aa);
  },
};
</script>


<style scoped>
.form-list {
  display: inline-block;
  margin-left: 155px;
}

.form-list /deep/ .el-form-item__label {
  /* font-size: 18px; */
  border-bottom: none;
  height: 30px;
  padding-right: 0;
}

.form-list /deep/ .el-form-item__content {
  /* font-size: 18px; */
  border-left: none;
  border-bottom: none;
  /* padding-left: 10px; */
  height: auto;
  box-sizing: border-box;
  word-break: break-word;
}

.form-list：:v-deep .el-form-item {
  margin: 0;
}

.form-list .el-input.el-input--mini {
  font-size: 14px;
}

.form-list /deep/ .el-checkbox .el-checkbox__label {
  font-size: 18px;
}

.form-list .signs .el-row {
  margin: 150px 0;
}

.form-list .el-row .el-col {
  text-align: left;
}

.form-list .el-row .el-col span {
  font-size: 19px;
  color: #000;
}

.top,
.bottom {
  width: 768px;
}

.pledgee-name h1,
.pledgee-name p {
  font-size: 22px;
  font-weight: bold;
  text-align: center;
  margin: 120px auto 20px auto;
  max-width: 506px;
  line-height: 45px;
}

.pledgee-name-one h1 {
  font-size: 30px;
  margin: 50px auto 40px auto;
}

.pledgee-name p {
  font-size: 18px;
  margin: 29px auto 0 0;
  font-weight: normal;
}

.idcard-img img,
.busimg-img img {
  display: inline-block;
  margin: 0 5px;
}

.busimg-img img {
  width: 500px;
}

.idcard-img img {
  width: 300px;
}

.idcard-img {
  width: 300px;
  margin-top: 10px !important;
}

.busimg-img {
  width: 500px;
  margin-top: 10px !important;
}

/* 改 */

body,
div,
a,
p,
span,
ul,
li {
  padding: 0;
  margin: 0;
}
div {
  box-sizing: border-box;
}
img {
  max-width: 100%;
  max-height: 100%;
}
a {
  text-decoration: none;
}

.amend-btn {
  position: absolute;
  top: 8%;
  right: 10%;
}
.buttona {
  color: #fff;
  padding: 8px 15px;
  border-radius: 5px;
  background: rgba(0, 0, 255, 0.5);
}
.buttona:hover {
  background: rgba(0, 0, 255, 0.8);
}

.dashed-text {
  /* 质权人信息部分的标题  */
  font-size: 17px;
  font-weight: bold;
  color: rgb(100, 100, 100);
}
.dashed {
  /* 质权人信息部分的内容  */
  width: 50%;
  margin-left: 10px;
  border-top: 1px dashed rgb(204, 204, 204);
}
.pledgee-msg {
  width: 1000px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px auto;
}
.top-left {
  /* 内容的左边部分  */
  width: 100%;
  /* border: 1px solid red; */
}
.form-menu {
  /*  每行内容的显示  */
  display: flex;
  flex-direction: row;
  /* padding: 5px 80px 5px 50px;
  padding: 8px 0; */
  /* border: 1px solid red; */
}
.form-menu-left {
  width: 100%;
  display: flex;
  line-height: 28px;
  flex-direction: row;
}
.form-menu-right {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
}
.form-menu-text {
  width: 320px;
  font-size: 14px;
  text-align: right;
  margin-right: 12px;
  line-height: 28px;
  color: #606266;
}
.parallelism {
  /* width: 100%; */
  width: 600px;
  word-wrap: break-word;
  line-height: 28px;
  /* padding: 10.2px 0; */
}
.el-input /deep/ .el-input__inner {
  color: #000;
  height: 38px;
}

.el-select {
  width: 700px;
}
.el-select-dropdown__item {
  padding-left: 20px;
}

/* 新版本样式 */
.stamp {
  width: 30%;
  height: 220px;
  font-size: 15px;
  text-align: center;
  /* border: 1px solid red; */
}
.agent {
  width: 100%;
  text-align: right;
  margin-right: 40%;
  margin-top: 60px;
}
.follower {
   padding: 50px 0 0 0;
}
.follower-title {
  font-size: 25px;
}

.follower-matter-frame {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 1000px;
  padding: 20px 0 0 120px;
}
.follower-matter-text {
  display: flex;
  font-size: 15px;
  text-align: right;
  line-height: 28px;
}
.follower-matter-text span:first-child {
  width: 200px;
  color: #606266;
}
.seal {
  margin-right: 150px;
  color: #ccc;
}
h1 {
  font-weight: 500;
  font-size: 25px;
}
h2 {
  font-size: 20px;
}
.fuye {
  margin-left: 140px;
}
.idCardImg {
  width: 350px;
  margin: 5px 0px;
}
.busImg {
  width: 500px;
  margin-top: 5px;
}
.displayNone {
  display: none;
}
.part {
  margin-left: 100px;
}
.img-show {
  width: 250px;
  /* height: 100%; */
  margin-top: 60px;
}
.img-show img {
  width: 100%;
  height: 100%;
}
</style>